package com.endpoint.book.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 批量抓取任务表
 * </p>
 *
 * @author liusp
 * @since 2025-06-21
 */
@TableName("crawl_batch_task")
public class CrawlBatchTask implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 爬虫源ID
     */
    private Integer sourceId;

    /**
     * 成功抓取数量
     */
    private Integer crawlCountSuccess;

    /**
     * 目标抓取数量
     */
    private Integer crawlCountTarget;

    /**
     * 任务状态，1：正在运行，0已停止
     */
    private Boolean taskStatus;

    /**
     * 任务开始时间
     */
    private LocalDateTime startTime;

    /**
     * 任务结束时间
     */
    private LocalDateTime endTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public Integer getCrawlCountSuccess() {
        return crawlCountSuccess;
    }

    public void setCrawlCountSuccess(Integer crawlCountSuccess) {
        this.crawlCountSuccess = crawlCountSuccess;
    }

    public Integer getCrawlCountTarget() {
        return crawlCountTarget;
    }

    public void setCrawlCountTarget(Integer crawlCountTarget) {
        this.crawlCountTarget = crawlCountTarget;
    }

    public Boolean getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(Boolean taskStatus) {
        this.taskStatus = taskStatus;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return "CrawlBatchTask{" +
        "id=" + id +
        ", sourceId=" + sourceId +
        ", crawlCountSuccess=" + crawlCountSuccess +
        ", crawlCountTarget=" + crawlCountTarget +
        ", taskStatus=" + taskStatus +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        "}";
    }
}
